window.onload = function (){
    var info = getQuery("errorInfo");
    if(info == "noGrade"){
        $("errorDiv").innerHTML = "请先登陆";
    }
}


function login(){
    axios.get("/user/login",{
        params:{
            userName:$("userName").value,
            pwd:$("pwd").value
        }
    }).then(resp =>{
        if(resp.data == "ok"){
            location.href = "/index.html";
        }
        else{
            $("errorDiv").innerHTML = "登陆失败";
        }
    })
}